'''
新增专项整治
'''
from Lib.base.keywords import KeyWords
from selenium.webdriver.common.by import By
from Lib.common.common_function import *
from Lib.base.page_object.login_page import LonginPage
import uuid
import random


class SpecialRectificationAdd(KeyWords):
    '''
    专项整治类
    '''
    url = KeyWords.url + 'special-rectification/create'

    def add_special_rectification(self):
        '''
        新建专项整治
        :return:
        '''
        data = get_data_by_yaml(get_path() + r'\Data\element_data\special\create_special.yaml')
        element_operation(self, data[0]['data'])

    def add_special_draft(self):
        '''
        新建专项整治到草稿箱
        :return:
        '''
        data = get_data_by_yaml(get_path() + r'\Data\element_data\special\create_special_draft.yaml')
        element_operation(self, data[0]['data'])


if __name__ == '__main__':
    driver = choose_browser()
    L = LonginPage(driver)
    L.login('kobeAdmin002', 'kobe8888')
    case = SpecialRectificationAdd(driver)
    case.add_special_rectification()
    driver.quit()

